home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / HFSVolumes.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  19.2 KB  |  484 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        HFSVolumes.p
  3.  
  4.      Contains:    On-disk data structures for HFS and HFS Plus volumes.
  5.  
  6.      Version:    Technology:    Mac OS 8.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1984-1998 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT HFSVolumes;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __HFSVOLUMES__}
  27. {$SETC __HFSVOLUMES__ := 1}
  28.  
  29. {$I+}
  30. {$SETC HFSVolumesIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __FILES__}
  37. {$I Files.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __FINDER__}
  40. {$I Finder.p}
  41. {$ENDC}
  42.  
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. { Signatures used to differentiate between HFS and HFS Plus volumes }
  49.  
  50. CONST
  51.     kHFSSigWord                    = $4244;                        {  'BD' in ASCII  }
  52.     kHFSPlusSigWord                = $482B;                        {  'H+' in ASCII  }
  53.     kHFSPlusVersion                = $0004;                        {  will change as format changes (version 4 shipped with Mac OS 8.1)  }
  54.     kHFSPlusMountVersion        = '8.10';                        {  will change as implementations change ('8.10' in Mac OS 8.1)  }
  55.  
  56.  
  57. { CatalogNodeID is used to track catalog objects }
  58.  
  59. TYPE
  60.     HFSCatalogNodeID                    = UInt32;
  61. { Unicode strings are used for file and folder names (HFS Plus only) }
  62.     HFSUniStr255Ptr = ^HFSUniStr255;
  63.     HFSUniStr255 = RECORD
  64.         length:                    UInt16;                                    {  number of unicode characters  }
  65.         unicode:                ARRAY [0..254] OF UniChar;                {  unicode characters  }
  66.     END;
  67.  
  68.     ConstHFSUniStr255Param                = ^HFSUniStr255;
  69.  
  70. CONST
  71.     kHFSMaxVolumeNameChars        = 27;
  72.     kHFSMaxFileNameChars        = 31;
  73.     kHFSPlusMaxFileNameChars    = 255;
  74.  
  75.  
  76. { Extent overflow file data structures }
  77. { HFS Extent key }
  78.  
  79. TYPE
  80.     HFSExtentKeyPtr = ^HFSExtentKey;
  81.     HFSExtentKey = RECORD
  82.         keyLength:                SInt8;                                    {  length of key, excluding this field  }
  83.         forkType:                SInt8;                                    {  0 = data fork, FF = resource fork  }
  84.         fileID:                    HFSCatalogNodeID;                        {  file ID  }
  85.         startBlock:                UInt16;                                    {  first file allocation block number in this extent  }
  86.     END;
  87.  
  88. { HFS Plus Extent key }
  89.     HFSPlusExtentKeyPtr = ^HFSPlusExtentKey;
  90.     HFSPlusExtentKey = RECORD
  91.         keyLength:                UInt16;                                    {  length of key, excluding this field  }
  92.         forkType:                SInt8;                                    {  0 = data fork, FF = resource fork  }
  93.         pad:                    SInt8;                                    {  make the other fields align on 32-bit boundary  }
  94.         fileID:                    HFSCatalogNodeID;                        {  file ID  }
  95.         startBlock:                UInt32;                                    {  first file allocation block number in this extent  }
  96.     END;
  97.  
  98. { Number of extent descriptors per extent record }
  99.  
  100. CONST
  101.     kHFSExtentDensity            = 3;
  102.     kHFSPlusExtentDensity        = 8;
  103.  
  104. { HFS extent descriptor }
  105.  
  106. TYPE
  107.     HFSExtentDescriptorPtr = ^HFSExtentDescriptor;
  108.     HFSExtentDescriptor = RECORD
  109.         startBlock:                UInt16;                                    {  first allocation block  }
  110.         blockCount:                UInt16;                                    {  number of allocation blocks  }
  111.     END;
  112.  
  113. { HFS Plus extent descriptor }
  114.     HFSPlusExtentDescriptorPtr = ^HFSPlusExtentDescriptor;
  115.     HFSPlusExtentDescriptor = RECORD
  116.         startBlock:                UInt32;                                    {  first allocation block  }
  117.         blockCount:                UInt32;                                    {  number of allocation blocks  }
  118.     END;
  119.  
  120. { HFS extent record }
  121.     HFSExtentRecord                        = ARRAY [0..2] OF HFSExtentDescriptor;
  122. { HFS Plus extent record }
  123.     HFSPlusExtentRecord                    = ARRAY [0..7] OF HFSPlusExtentDescriptor;
  124.  
  125. { Fork data info (HFS Plus only) - 80 bytes }
  126.     HFSPlusForkDataPtr = ^HFSPlusForkData;
  127.     HFSPlusForkData = RECORD
  128.         logicalSize:            UInt64;                                    {  fork's logical size in bytes  }
  129.         clumpSize:                UInt32;                                    {  fork's clump size in bytes  }
  130.         totalBlocks:            UInt32;                                    {  total blocks used by this fork  }
  131.         extents:                HFSPlusExtentRecord;                    {  initial set of extents  }
  132.     END;
  133.  
  134. { Permissions info (HFS Plus only) - 16 bytes }
  135.     HFSPlusPermissionsPtr = ^HFSPlusPermissions;
  136.     HFSPlusPermissions = RECORD
  137.         ownerID:                UInt32;                                    {  user or group ID of file/folder owner  }
  138.         groupID:                UInt32;                                    {  additional user of group ID  }
  139.         permissions:            UInt32;                                    {  permissions (bytes: unused, owner, group, everyone)  }
  140.         specialDevice:            UInt32;                                    {  UNIX: device for character or block special file  }
  141.     END;
  142.  
  143. { Catalog file data structures }
  144.  
  145. CONST
  146.     kHFSRootParentID            = 1;                            {  Parent ID of the root folder  }
  147.     kHFSRootFolderID            = 2;                            {  Folder ID of the root folder  }
  148.     kHFSExtentsFileID            = 3;                            {  File ID of the extents file  }
  149.     kHFSCatalogFileID            = 4;                            {  File ID of the catalog file  }
  150.     kHFSBadBlockFileID            = 5;                            {  File ID of the bad allocation block file  }
  151.     kHFSAllocationFileID        = 6;                            {  File ID of the allocation file (HFS Plus only)  }
  152.     kHFSStartupFileID            = 7;                            {  File ID of the startup file (HFS Plus only)  }
  153.     kHFSAttributesFileID        = 8;                            {  File ID of the attribute file (HFS Plus only)  }
  154.     kHFSBogusExtentFileID        = 15;                            {  Used for exchanging extents in extents file  }
  155.     kHFSFirstUserCatalogNodeID    = 16;
  156.  
  157.  
  158. { HFS catalog key }
  159.  
  160. TYPE
  161.     HFSCatalogKeyPtr = ^HFSCatalogKey;
  162.     HFSCatalogKey = RECORD
  163.         keyLength:                SInt8;                                    {  key length (in bytes)  }
  164.         reserved:                SInt8;                                    {  reserved (set to zero)  }
  165.         parentID:                HFSCatalogNodeID;                        {  parent folder ID  }
  166.         nodeName:                Str31;                                    {  catalog node name  }
  167.     END;
  168.  
  169. { HFS Plus catalog key }
  170.     HFSPlusCatalogKeyPtr = ^HFSPlusCatalogKey;
  171.     HFSPlusCatalogKey = RECORD
  172.         keyLength:                UInt16;                                    {  key length (in bytes)  }
  173.         parentID:                HFSCatalogNodeID;                        {  parent folder ID  }
  174.         nodeName:                HFSUniStr255;                            {  catalog node name  }
  175.     END;
  176.  
  177.  
  178. { Catalog record types }
  179.  
  180. CONST
  181.                                                                 {  HFS Catalog Records  }
  182.     kHFSFolderRecord            = $0100;                        {  Folder record  }
  183.     kHFSFileRecord                = $0200;                        {  File record  }
  184.     kHFSFolderThreadRecord        = $0300;                        {  Folder thread record  }
  185.     kHFSFileThreadRecord        = $0400;                        {  File thread record  }
  186.                                                                 {  HFS Plus Catalog Records  }
  187.     kHFSPlusFolderRecord        = 1;                            {  Folder record  }
  188.     kHFSPlusFileRecord            = 2;                            {  File record  }
  189.     kHFSPlusFolderThreadRecord    = 3;                            {  Folder thread record  }
  190.     kHFSPlusFileThreadRecord    = 4;                            {  File thread record  }
  191.  
  192.  
  193. { Catalog file record flags }
  194.     kHFSFileLockedBit            = $0000;                        {  file is locked and cannot be written to  }
  195.     kHFSFileLockedMask            = $0001;
  196.     kHFSThreadExistsBit            = $0001;                        {  a file thread record exists for this file  }
  197.     kHFSThreadExistsMask        = $0002;
  198.  
  199.  
  200. { HFS catalog folder record - 70 bytes }
  201.  
  202. TYPE
  203.     HFSCatalogFolderPtr = ^HFSCatalogFolder;
  204.     HFSCatalogFolder = RECORD
  205.         recordType:                SInt16;                                    {  record type  }
  206.         flags:                    UInt16;                                    {  folder flags  }
  207.         valence:                UInt16;                                    {  folder valence  }
  208.         folderID:                HFSCatalogNodeID;                        {  folder ID  }
  209.         createDate:                UInt32;                                    {  date and time of creation  }
  210.         modifyDate:                UInt32;                                    {  date and time of last modification  }
  211.         backupDate:                UInt32;                                    {  date and time of last backup  }
  212.         userInfo:                DInfo;                                    {  Finder information  }
  213.         finderInfo:                DXInfo;                                    {  additional Finder information  }
  214.         reserved:                ARRAY [0..3] OF UInt32;                    {  reserved - set to zero  }
  215.     END;
  216.  
  217. { HFS Plus catalog folder record - 88 bytes }
  218.     HFSPlusCatalogFolderPtr = ^HFSPlusCatalogFolder;
  219.     HFSPlusCatalogFolder = RECORD
  220.         recordType:                SInt16;                                    {  record type = HFS Plus folder record  }
  221.         flags:                    UInt16;                                    {  file flags  }
  222.         valence:                UInt32;                                    {  folder's valence (limited to 2^16 in Mac OS)  }
  223.         folderID:                HFSCatalogNodeID;                        {  folder ID  }
  224.         createDate:                UInt32;                                    {  date and time of creation  }
  225.         contentModDate:            UInt32;                                    {  date and time of last content modification  }
  226.         attributeModDate:        UInt32;                                    {  date and time of last attribute modification  }
  227.         accessDate:                UInt32;                                    {  date and time of last access (Rhapsody only)  }
  228.         backupDate:                UInt32;                                    {  date and time of last backup  }
  229.         permissions:            HFSPlusPermissions;                        {  permissions (for Rhapsody)  }
  230.         userInfo:                DInfo;                                    {  Finder information  }
  231.         finderInfo:                DXInfo;                                    {  additional Finder information  }
  232.         textEncoding:            UInt32;                                    {  hint for name conversions  }
  233.         reserved:                UInt32;                                    {  reserved - set to zero  }
  234.     END;
  235.  
  236. { HFS catalog file record - 102 bytes }
  237.     HFSCatalogFilePtr = ^HFSCatalogFile;
  238.     HFSCatalogFile = RECORD
  239.         recordType:                SInt16;                                    {  record type  }
  240.         flags:                    SInt8;                                    {  file flags  }
  241.         fileType:                SInt8;                                    {  file type (unused ?)  }
  242.         userInfo:                FInfo;                                    {  Finder information  }
  243.         fileID:                    HFSCatalogNodeID;                        {  file ID  }
  244.         dataStartBlock:            UInt16;                                    {  not used - set to zero  }
  245.         dataLogicalSize:        SInt32;                                    {  logical EOF of data fork  }
  246.         dataPhysicalSize:        SInt32;                                    {  physical EOF of data fork  }
  247.         rsrcStartBlock:            UInt16;                                    {  not used - set to zero  }
  248.         rsrcLogicalSize:        SInt32;                                    {  logical EOF of resource fork  }
  249.         rsrcPhysicalSize:        SInt32;                                    {  physical EOF of resource fork  }
  250.         createDate:                UInt32;                                    {  date and time of creation  }
  251.         modifyDate:                UInt32;                                    {  date and time of last modification  }
  252.         backupDate:                UInt32;                                    {  date and time of last backup  }
  253.         finderInfo:                FXInfo;                                    {  additional Finder information  }
  254.         clumpSize:                UInt16;                                    {  file clump size (not used)  }
  255.         dataExtents:            HFSExtentRecord;                        {  first data fork extent record  }
  256.         rsrcExtents:            HFSExtentRecord;                        {  first resource fork extent record  }
  257.         reserved:                UInt32;                                    {  reserved - set to zero  }
  258.     END;
  259.  
  260. { HFS Plus catalog file record - 248 bytes }
  261.     HFSPlusCatalogFilePtr = ^HFSPlusCatalogFile;
  262.     HFSPlusCatalogFile = RECORD
  263.         recordType:                SInt16;                                    {  record type = HFS Plus file record  }
  264.         flags:                    UInt16;                                    {  file flags  }
  265.         reserved1:                UInt32;                                    {  reserved - set to zero  }
  266.         fileID:                    HFSCatalogNodeID;                        {  file ID  }
  267.         createDate:                UInt32;                                    {  date and time of creation  }
  268.         contentModDate:            UInt32;                                    {  date and time of last content modification  }
  269.         attributeModDate:        UInt32;                                    {  date and time of last attribute modification  }
  270.         accessDate:                UInt32;                                    {  date and time of last access (Rhapsody only)  }
  271.         backupDate:                UInt32;                                    {  date and time of last backup  }
  272.         permissions:            HFSPlusPermissions;                        {  permissions (for Rhapsody)  }
  273.         userInfo:                FInfo;                                    {  Finder information  }
  274.         finderInfo:                FXInfo;                                    {  additional Finder information  }
  275.         textEncoding:            UInt32;                                    {  hint for name conversions  }
  276.         reserved2:                UInt32;                                    {  reserved - set to zero  }
  277.                                                                         {  start on double long (64 bit) boundry  }
  278.         dataFork:                HFSPlusForkData;                        {  size and block data for data fork  }
  279.         resourceFork:            HFSPlusForkData;                        {  size and block data for resource fork  }
  280.     END;
  281.  
  282. { HFS catalog thread record - 46 bytes }
  283.     HFSCatalogThreadPtr = ^HFSCatalogThread;
  284.     HFSCatalogThread = RECORD
  285.         recordType:                SInt16;                                    {  record type  }
  286.         reserved:                ARRAY [0..1] OF SInt32;                    {  reserved - set to zero  }
  287.         parentID:                HFSCatalogNodeID;                        {  parent ID for this catalog node  }
  288.         nodeName:                Str31;                                    {  name of this catalog node  }
  289.     END;
  290.  
  291. { HFS Plus catalog thread record -- 264 bytes }
  292.     HFSPlusCatalogThreadPtr = ^HFSPlusCatalogThread;
  293.     HFSPlusCatalogThread = RECORD
  294.         recordType:                SInt16;                                    {  record type  }
  295.         reserved:                SInt16;                                    {  reserved - set to zero  }
  296.         parentID:                HFSCatalogNodeID;                        {  parent ID for this catalog node  }
  297.         nodeName:                HFSUniStr255;                            {  name of this catalog node (variable length)  }
  298.     END;
  299.  
  300.  
  301. {
  302.       These are the types of records in the attribute B-tree.  The values were chosen
  303.       so that they wouldn't conflict with the catalog record types.
  304. }
  305.  
  306. CONST
  307.     kHFSPlusAttrInlineData        = $10;                            {  if size <  kAttrOverflowSize  }
  308.     kHFSPlusAttrForkData        = $20;                            {  if size >= kAttrOverflowSize  }
  309.     kHFSPlusAttrExtents            = $30;                            {  overflow extents for large attributes  }
  310.  
  311.  
  312. {
  313.       HFSPlusAttrInlineData
  314.       For small attributes, whose entire value is stored within this one
  315.       B-tree record.
  316.       There would not be any other records for this attribute.
  317. }
  318.  
  319. TYPE
  320.     HFSPlusAttrInlineDataPtr = ^HFSPlusAttrInlineData;
  321.     HFSPlusAttrInlineData = RECORD
  322.         recordType:                UInt32;                                    {     = kHFSPlusAttrInlineData }
  323.         reserved:                UInt32;
  324.         logicalSize:            UInt32;                                    {     size in bytes of userData }
  325.         userData:                PACKED ARRAY [0..1] OF Byte;            {     variable length; space allocated is a multiple of 2 bytes }
  326.     END;
  327.  
  328. {
  329.       HFSPlusAttrForkData
  330.       For larger attributes, whose value is stored in allocation blocks.
  331.       If the attribute has more than 8 extents, there will be additonal
  332.       records (of type HFSPlusAttrExtents) for this attribute.
  333. }
  334.     HFSPlusAttrForkDataPtr = ^HFSPlusAttrForkData;
  335.     HFSPlusAttrForkData = RECORD
  336.         recordType:                UInt32;                                    {     = kHFSPlusAttrForkData }
  337.         reserved:                UInt32;
  338.         theFork:                HFSPlusForkData;                        {     size and first extents of value }
  339.     END;
  340.  
  341. {
  342.       HFSPlusAttrExtents
  343.       This record contains information about overflow extents for large,
  344.       fragmented attributes.
  345. }
  346.     HFSPlusAttrExtentsPtr = ^HFSPlusAttrExtents;
  347.     HFSPlusAttrExtents = RECORD
  348.         recordType:                UInt32;                                    {     = kHFSPlusAttrExtents }
  349.         reserved:                UInt32;
  350.         extents:                HFSPlusExtentRecord;                    {     additional extents }
  351.     END;
  352.  
  353. {     A generic Attribute Record }
  354.     HFSPlusAttrRecordPtr = ^HFSPlusAttrRecord;
  355.     HFSPlusAttrRecord = RECORD
  356.         CASE INTEGER OF
  357.         0: (
  358.             recordType:            UInt32;
  359.             );
  360.         1: (
  361.             inlineData:            HFSPlusAttrInlineData;
  362.             );
  363.         2: (
  364.             forkData:            HFSPlusAttrForkData;
  365.             );
  366.         3: (
  367.             overflowExtents:    HFSPlusAttrExtents;
  368.             );
  369.     END;
  370.  
  371. { Key and node lengths }
  372.  
  373. CONST
  374.     kHFSPlusExtentKeyMaximumLength = 10;
  375.     kHFSExtentKeyMaximumLength    = 7;
  376.     kHFSPlusCatalogKeyMaximumLength = 516;
  377.     kHFSPlusCatalogKeyMinimumLength = 6;
  378.     kHFSCatalogKeyMaximumLength    = 37;
  379.     kHFSCatalogKeyMinimumLength    = 6;
  380.     kHFSPlusCatalogMinNodeSize    = 4096;
  381.     kHFSPlusExtentMinNodeSize    = 512;
  382.     kHFSPlusAttrMinNodeSize        = 4096;
  383.  
  384.  
  385. { HFS and HFS Plus volume attribute bits }
  386.                                                                 {  Bits 0-6 are reserved (always cleared by MountVol call)  }
  387.     kHFSVolumeHardwareLockBit    = 7;                            {  volume is locked by hardware  }
  388.     kHFSVolumeUnmountedBit        = 8;                            {  volume was successfully unmounted  }
  389.     kHFSVolumeSparedBlocksBit    = 9;                            {  volume has bad blocks spared  }
  390.     kHFSVolumeNoCacheRequiredBit = 10;                            {  don't cache volume blocks (i.e. RAM or ROM disk)  }
  391.     kHFSBootVolumeInconsistentBit = 11;                            {  boot volume is inconsistent (System 7.6 and later)  }
  392.                                                                 {  Bits 12-14 are reserved for future use  }
  393.     kHFSVolumeSoftwareLockBit    = 15;                            {  volume is locked by software  }
  394.     kHFSVolumeHardwareLockMask    = $80;
  395.     kHFSVolumeUnmountedMask        = $0100;
  396.     kHFSVolumeSparedBlocksMask    = $0200;
  397.     kHFSVolumeNoCacheRequiredMask = $0400;
  398.     kHFSBootVolumeInconsistentMask = $0800;
  399.     kHFSVolumeSoftwareLockMask    = $8000;
  400.     kHFSMDBAttributesMask        = $8380;
  401.  
  402.  
  403. { Master Directory Block (HFS only) - 162 bytes }
  404. { Stored at sector #2 (3rd sector) }
  405.  
  406. TYPE
  407.     HFSMasterDirectoryBlockPtr = ^HFSMasterDirectoryBlock;
  408.     HFSMasterDirectoryBlock = RECORD
  409.                                                                         {  These first fields are also used by MFS  }
  410.         drSigWord:                UInt16;                                    {  volume signature  }
  411.         drCrDate:                UInt32;                                    {  date and time of volume creation  }
  412.         drLsMod:                UInt32;                                    {  date and time of last modification  }
  413.         drAtrb:                    UInt16;                                    {  volume attributes  }
  414.         drNmFls:                SInt16;                                    {  number of files in root folder  }
  415.         drVBMSt:                UInt16;                                    {  first block of volume bitmap  }
  416.         drAllocPtr:                UInt16;                                    {  start of next allocation search  }
  417.         drNmAlBlks:                UInt16;                                    {  number of allocation blocks in volume  }
  418.         drAlBlkSiz:                SInt32;                                    {  size (in bytes) of allocation blocks  }
  419.         drClpSiz:                SInt32;                                    {  default clump size  }
  420.         drAlBlSt:                SInt16;                                    {  first allocation block in volume  }
  421.         drNxtCNID:                UInt32;                                    {  next unused catalog node ID  }
  422.         drFreeBks:                SInt16;                                    {  number of unused allocation blocks  }
  423.         drVN:                    Str27;                                    {  volume name  }
  424.                                                                         {  Master Directory Block extensions for HFS  }
  425.         drVolBkUp:                UInt32;                                    {  date and time of last backup  }
  426.         drVSeqNum:                UInt16;                                    {  volume backup sequence number  }
  427.         drWrCnt:                SInt32;                                    {  volume write count  }
  428.         drXTClpSiz:                SInt32;                                    {  clump size for extents overflow file  }
  429.         drCTClpSiz:                SInt32;                                    {  clump size for catalog file  }
  430.         drNmRtDirs:                SInt16;                                    {  number of directories in root folder  }
  431.         drFilCnt:                SInt32;                                    {  number of files in volume  }
  432.         drDirCnt:                SInt32;                                    {  number of directories in volume  }
  433.         drFndrInfo:                ARRAY [0..7] OF SInt32;                    {  information used by the Finder  }
  434.         drEmbedSigWord:            UInt16;                                    {  embedded volume signature (formerly drVCSize)  }
  435.         drEmbedExtent:            HFSExtentDescriptor;                    {  embedded volume location and size (formerly drVBMCSize and drCtlCSize)  }
  436.         drXTFlSize:                SInt32;                                    {  size of extents overflow file  }
  437.         drXTExtRec:                HFSExtentRecord;                        {  extent record for extents overflow file  }
  438.         drCTFlSize:                SInt32;                                    {  size of catalog file  }
  439.         drCTExtRec:                HFSExtentRecord;                        {  extent record for catalog file  }
  440.     END;
  441.  
  442. { HFSPlusVolumeHeader (HFS Plus only) - 512 bytes }
  443. { Stored at sector #2 (3rd sector) and second-to-last sector. }
  444.     HFSPlusVolumeHeaderPtr = ^HFSPlusVolumeHeader;
  445.     HFSPlusVolumeHeader = RECORD
  446.         signature:                UInt16;                                    {  volume signature == 'H+'  }
  447.         version:                UInt16;                                    {  current version is kHFSPlusVersion  }
  448.         attributes:                UInt32;                                    {  volume attributes  }
  449.         lastMountedVersion:        UInt32;                                    {  implementation version which last mounted volume  }
  450.         reserved:                UInt32;                                    {  reserved - set to zero  }
  451.         createDate:                UInt32;                                    {  date and time of volume creation  }
  452.         modifyDate:                UInt32;                                    {  date and time of last modification  }
  453.         backupDate:                UInt32;                                    {  date and time of last backup  }
  454.         checkedDate:            UInt32;                                    {  date and time of last disk check  }
  455.         fileCount:                UInt32;                                    {  number of files in volume  }
  456.         folderCount:            UInt32;                                    {  number of directories in volume  }
  457.         blockSize:                UInt32;                                    {  size (in bytes) of allocation blocks  }
  458.         totalBlocks:            UInt32;                                    {  number of allocation blocks in volume (includes this header and VBM }
  459.         freeBlocks:                UInt32;                                    {  number of unused allocation blocks  }
  460.         nextAllocation:            UInt32;                                    {  start of next allocation search  }
  461.         rsrcClumpSize:            UInt32;                                    {  default resource fork clump size  }
  462.         dataClumpSize:            UInt32;                                    {  default data fork clump size  }
  463.         nextCatalogID:            HFSCatalogNodeID;                        {  next unused catalog node ID  }
  464.         writeCount:                UInt32;                                    {  volume write count  }
  465.         encodingsBitmap:        UInt64;                                    {  which encodings have been use  on this volume  }
  466.         finderInfo:                PACKED ARRAY [0..31] OF UInt8;            {  information used by the Finder  }
  467.         allocationFile:            HFSPlusForkData;                        {  allocation bitmap file  }
  468.         extentsFile:            HFSPlusForkData;                        {  extents B-tree file  }
  469.         catalogFile:            HFSPlusForkData;                        {  catalog B-tree file  }
  470.         attributesFile:            HFSPlusForkData;                        {  extended attributes B-tree file  }
  471.         startupFile:            HFSPlusForkData;                        {  boot file  }
  472.     END;
  473.  
  474. {$ALIGN RESET}
  475. {$POP}
  476.  
  477. {$SETC UsingIncludes := HFSVolumesIncludes}
  478.  
  479. {$ENDC} {__HFSVOLUMES__}
  480.  
  481. {$IFC NOT UsingIncludes}
  482.  END.
  483. {$ENDC}
  484.